package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 充值套餐
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_plan")
public class Plan extends Model<Plan> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "plan_code", type = IdType.NONE)
    private String planCode;
    /**
     * 套餐名称
     */
    @TableField("plan_name")
    private String planName;
    /**
     * 套餐说明
     */
    @TableField("plate_note")
    private String plateNote;
    /**
     * 套餐封面
     */
    @TableField("plate_cover")
    private String plateCover;
    /**
     * 套餐金额
     */
    @TableField("plate_amount")
    private Integer plateAmount;
    /**
     * 减免金额
     */
    @TableField("deduction_amount")
    private Integer deductionAmount;
    /**
     * 赠送比列
     */
    @TableField("gift_ratio")
    private Integer giftRatio;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
    /**
     * 优惠起始金额
     */
    @TableField("start_amount")
    private Integer startAmount;
    /**
     * 排序
     */
    @TableField("idx")
    private Integer idx;
    /**
     * 操作人
     */
    @TableField("operator")
    private String operator;
    /**
     * 操作组织
     */
    @TableField("operate_org_id")
    private String operateOrgId;
    /**
     * 是否启用
     */
    @TableField("enable")
    private String enable;

    public void freeData() {
        this.planCode = null;
        this.planName = null;
        this.plateNote = null;
        this.plateCover = null;
        this.plateAmount = null;
        this.deductionAmount = null;
        this.giftRatio = null;
        this.addTime = null;
        this.updateTime = null;
        this.startAmount = null;
        this.idx = null;
        this.operator = null;
        this.operateOrgId = null;
        this.enable = null;
    }

}
